cat > tmptmpGetStat.C <<EOF
void tmptmpGetStat(const TString fin, const TString jpt, const TString eta){
TFile::Open(fin);
const Double_t cont = horiginal->GetEntries()+tof->GetEntries(); 
printf("jpt %s eta %s count %e\n", jpt.Data(), eta.Data(), cont);
}

EOF

cat > seeStat.log <<EOF
EOF

#for jpt in $(echo 5-7 7-10 10-15 15-20 5-9 9-15 5-10 10-20 5-6 6-7 7-8 8-9 9-10)
#for jpt in $(echo 5-6 6-7 7-8 8-9 9-10 5-10 10-15 15-20)
for jpt in $(echo 5-10 10-15 15-20)
do
    for eta in $(echo 0 1 2 3)
    do
        echo jpt $jpt eta $eta
        file=$(find DATA/histR*TPC1TOF9*ETA$eta*JPT$jpt/hist*.root)
        echo $file

        root -l -b -q 'tmptmpGetStat.C("'$file'", "'$jpt'", "'$eta'")' >> seeStat.log

        echo
    done
done

rm -f tmptmpGetStat.C
